var express = require("express");
const multer = require("multer");
const upload = multer({ dest: "public/uploads/" });
var userRouter = express.Router();
const UserController = require("../../controllers/admin/userController");

/* GET users listing. */
userRouter.post("/login", UserController.login);

userRouter.get("/getInfo", UserController.getInfo);

userRouter.post("/user/add", upload.single("file"), UserController.addUser);

userRouter.put("/user/edit", upload.single("file"), UserController.editUser);

userRouter.get("/user/list", UserController.getUserList);

userRouter.delete("/user/delete", UserController.deleteUser);

module.exports = userRouter;
